# Maintainer: Martell Malone <martellmalone@gmail.com>

pkgname="fcode-utils"
pkgver=1.0.2
pkgrel=1
pkgdesc="The OpenBIOS FCODE suite"
arch=('i686' 'x86_64')
url="http://www.openbios.org"
license=('GPL2')
makedepends=('unzip' 'make')

source=("${pkgname}-${pkgver}.zip"::"http://tracker.coreboot.org/trac/openbios/changeset/197/fcode-utils?old_path=%2F&old=197&format=zip")
sha1sums=('SKIP')

noextract=${pkgname}-${pkgver}.zip

prepare() {
  cd $srcdir
  unzip ${pkgname}-${pkgver}.zip
}

build() {
  cd $srcdir/${pkgname}
  make -j1
}

package() {
  cd $srcdir/${pkgname}
  mkdir -p ${pkgdir}/usr/bin

  cp -rf ${srcdir}/${pkgname}/toke/toke.exe ${pkgdir}/usr/bin/
  cp -rf ${srcdir}/${pkgname}/detok/detok.exe ${pkgdir}/usr/bin/
  cp -rf ${srcdir}/${pkgname}/romheaders/romheaders.exe ${pkgdir}/usr/bin/
}

